home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / keyb / pkii_112.zip / ANSI.DOC next >
Text File  |  1989-03-04  |  27KB  |  490 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                              ANSI.MOD Documentation 
  9.  
  10.  
  11.                                   January 1989
  12.                                   Version 1.12
  13.  
  14.  
  15.                        Copyright 1988 by John H. Brooks.
  16.                               All rights reserved.
  17.                        Permission is granted to quote or 
  18.               distribute copies of this documentation separately,
  19.                  and the entire, unaltered POWERKIT II package.
  20.  
  21.  
  22.     DISCLAIMER: This software is sold "as is."  No warranty is given, either 
  23.     express or implied, that any specific POWERKIT feature will work on any 
  24.     particular machine.  The manufacturer will not be liable for any damage 
  25.     caused by the use of POWERKIT. 
  26.     
  27.     The names of hardware and software products, and companies mentioned in 
  28.     this document are trademarks or service marks of the respective companies.
  29.  
  30. FORWARD: Welcome, let me tell you what this ANSI.MOD documentation does NOT 
  31.     contain.  Although ANSI.MOD supports most of the ANSI X3.64 and VT100 
  32.     "escape" sequences, not all of them will be described here.  Just remember 
  33.     that ANSI.MOD will do the job for you, should you have an application pro-
  34.     gram that requires VT100 emulation, or ANSI.SYS be loaded.  Also, ANSI.MOD 
  35.     has many helpful routines that can be used by other programs, and these 
  36.     will not be mentioned here either.  Instead, for those of you who might 
  37.     wish to write your own "module", or to delve into the esoteric mysteries of 
  38.     ANSI "escape" sequences, there is a technical reference manual available to 
  39.     all registered users of POWERKIT II. 
  40.  
  41.     I have placed the "module" format for executable TSR (and device driver, 
  42.     ANSI.MOD is the console device driver *) files in the public domain, and 
  43.     any software developer, commercial or shareware, may use it, free of royal-
  44.     ties.  You may also take advantage of ANSI.MOD's superior routines in your 
  45.     programs.  There are some restrictions, and you MUST contact me for 
  46.     approval, and for the specifics of this offer. 
  47.  
  48. WHAT IS ANSI.MOD?  ANSI.MOD performs three major tasks (the keystroke buffer, 
  49.         with view-port, is a separate program).  First, it is a replacement for 
  50.         the rather inadequate MS/PC-DOS console that controls your screen and 
  51.         keyboard.  The DOS console's inadequacies are the reason every major 
  52.         application package handles its own I/O to/from the screen and key-
  53.         board.  Since each program handles this I/O a bit differently, you can
  54.  
  55. * - For you "techies", ANSI.MOD (when active, and it's simple to turn it on and 
  56.     off) is the highest "CON" link in the device driver chain, is carried in 
  57.     the "list of lists" as the console driver, takes over INT 29h duties, and 
  58.     is the "file" that answers to "handles" 0, 1, and 2. 
  59.  
  60. Page 2 
  61.         
  62.         blame the poorly designed DOS console for the fact that some of your 
  63.         favorite pop-up TSR's (terminate, but stay resident programs) don't 
  64.         work inside some of your applications, and why some TSR's don't work 
  65.         very well with other TSR's.  Thus, a major goal of the POWERKIT II 
  66.         design is, at least, to get a special class of TSR's, called "modules", 
  67.         to COEXIST amicably.  To this end, ANSI.MOD provides a set of keyboard 
  68.         handling and screen updating routines, that are quite simply the best 
  69.         in the business.  ANSI.MOD can replace an entire 80x25 screen, 40 times 
  70.         a second, on a standard 4.77 Mhz PC. 
  71.  
  72.         Second, ANSI.MOD is a replacement for the equally laughable ANSI.SYS 
  73.         that came in your DOS package.  It has a far larger set of the ANSI 
  74.         X3.64 and VT100 escape sequences, plus a few that ANSI never heard of.  
  75.         The commands represented by the escape sequences work under much more 
  76.         diverse conditions than do the corresponding ANSI.SYS commands, and in 
  77.         many instances, the same command does many more things than its ANSI-
  78.         .SYS counterpart. 
  79.  
  80.         To cite an example, the old ANSI "keyboard redefine" sequence did 
  81.         indeed replace one character by one or more other characters, giving 
  82.         ANSI.SYS a "MACRO" capability, sort of.  But, the key redefinition 
  83.         acted ONLY at the DOS prompt (well OK, in DEBUG and EDLIN too).  When 
  84.         you entered an application, the key reverted to its former self.  ANSI-
  85.         .MOD produces true MACROS that are available at the touch of a key, all 
  86.         the time. 
  87.  
  88.         Furthermore, you can attach a comment or description to each of your 
  89.         MACROS, to remind you of some important fact about them.  There is a 
  90.         way provided to show this comment, and also a means to move this MACRO 
  91.         to a different key (you'll see why later).
  92.  
  93.         Another feature unique to ANSI.MOD's MACROS is that ANSI escape 
  94.         sequences can be embedded in them.  Thus, MACROS can be used to com-
  95.         mand your communications port (dial the phone, for example), or 
  96.         printer, or even to define (or delete!!, even themselves) other MACROS. 
  97.  
  98.         Finally, MACROS can be defined at any time, because ANSI.MOD pro-
  99.         vides "hot" key access to the ANSI sequence parser, replacing "PROMPT 
  100.         $e [" (ALT-ESC is the default, and FYI, all hot keys for POWERKIT II 
  101.         modules are just special types of MACROS, the help screens for the mod-
  102.         ules are the above-mentioned comments, and the hot key can be moved 
  103.         just like any other MACRO).  The old, unhandy "PROMPT $e [ ... " method 
  104.         is still available for batch file use, etc. 
  105.  
  106.         Oops, I almost forgot, an ANSI.MOD MACRO can contain sub-macros 
  107.         (to 10 levels deep), and these are expanded when the outer MACRO is 
  108.         being called, not when the outer MACRO is being defined.  This not 
  109.         only saves space in the MACRO buffer, but the sub-macro(s) can be 
  110.         ALTERED between calls to the outer MACRO.  I'm sure you will discover 
  111.         many uses for this sophisticated capability.
  112.  
  113.         Speaking of space, ANSI.MOD MACROS use only a single byte for most key-
  114.         strokes, except "extended" ASCII codes (these are two byte codes whose 
  115.         first byte is 0, or E0h).  "Problem" codes (such as control codes) are 
  116.         handled in software.  This results in a significantly larger program, 
  117.         but the reward is, ANSI's buffer will hold almost twice as much inform-
  118.         ation, in the same space, as some other "KEY" or "ANSI type" programs. 
  119.  
  120. Page 3
  121.  
  122.         This brings us to a second important goal of POWERKIT II, STANDARD-
  123.         IZATION!!!.  All good word processors, spreadsheets, data "basers", 
  124.         provide many of the same helpful operations, like SEARCH, REPLACE, 
  125.         COPY, MOVE, DELETE, to name a few.  The only trouble is, they each use 
  126.         different keystrokes to accomplish these tasks, and YOU have to REMEM-
  127.         BER which keystroke combination goes with which program.  NO MORE, just 
  128.         create a batch file for each of your programs.  The batch file will 
  129.         create MACROS that move these operations to the same keys in all the 
  130.         programs -- call the program -- then "uncreate" the MACROS (yep, I 
  131.         forgot that too, you can delete MACROS) after exiting the program. 
  132.  
  133.         Lastly, ANSI.MOD is the traffic cop that mediates potential conflicts 
  134.         between POWERKIT II modules, recognizes hot keys and calls the associ-
  135.         ated module, disables one when another pops up on top of it (to 4 lev-
  136.         els deep), interprets their "command" keys for them and calls the 
  137.         proper routine, sends them keystrokes when asked, pops up their help 
  138.         screens when F1 is pressed, provides many other useful routines (PKII-
  139.         .MOD is several hundred bytes smaller because of these routines). 
  140.  
  141.         Now for perhaps THE most AMAZING fact about ANSI.MOD.  In its smallest 
  142.         configuration, with a 256 byte MACRO / ANSI sequence buffer, ANSI.MOD